
/** $Id: Amf3Encoder.java 60 2009-06-15 08:47:09Z salbanese0080@gmail.com $ */

package org.aquiferserver.server.net;

import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ChannelPipelineCoverage;
import org.jboss.netty.handler.codec.string.StringEncoder;

/**
 * @author Seth Albanese
 *
 */
@ChannelPipelineCoverage("all")
public class Amf3Encoder extends StringEncoder 
{
	protected Object encode( ChannelHandlerContext ctx, Channel c, Object msg ) throws Exception
	{
		Amf3Codec codec = ( Amf3Codec ) CodecFactory.getCodec();
		String res = codec.encode( msg );
		
		return super.encode(ctx, c, res);
	}
}
